<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<title>开饭啦外卖平台</title>
<link rel="stylesheet" type="text/css" href="/css/vendors.css">
</head>
<body class="vertical-layout vertical-menu 2-columns   menu-expanded fixed-navbar" data-open="click" data-menu="vertical-menu" data-color="bg-gradient-x-purple-blue" data-col="2-columns">
<nav class="header-navbar navbar-expand-md navbar navbar-with-menu navbar-without-dd-arrow fixed-top navbar-semi-light">
  <div class="navbar-wrapper">
    <div class="navbar-container content">
      <div class="collapse navbar-collapse show" id="navbar-mobile">
        <ul class="nav navbar-nav mr-auto float-left">
          <li class="nav-item mobile-menu d-md-none mr-auto"><a class="nav-link nav-menu-main menu-toggle hidden-xs" href="javascript:;"><i class="ft-menu font-large-1"></i></a></li>
          <li class="nav-item d-none d-md-block"><a class="nav-link nav-menu-main menu-toggle hidden-xs" href="javascript:;"><i class="ft-menu"></i></a></li>
          <li class="nav-item dropdown navbar-search"><a class="nav-link dropdown-toggle hide" data-toggle="dropdown" href="javascript:;"><i class="ficon ft-search"></i></a>
            <ul class="dropdown-menu">
              <li class="arrow_box">
                <form>
                  <div class="input-group search-box">
                    <div class="position-relative has-icon-right full-width">
                      <input class="form-control" id="search" type="text" placeholder="Search here...">
                      <div class="form-control-position navbar-search-close"><i class="ft-x"></i></div>
                    </div>
                  </div>
                </form>
              </li>
            </ul>
          </li>
        </ul>
        <ul class="nav navbar-nav float-right">
          <li class="dropdown dropdown-user nav-item"> <a class=" nav-link dropdown-user-link" href="login.html" > <span class="username"><i class="ft-power"></i>退出登录</span> </a> </li>
          <li class="dropdown dropdown-user nav-item"> <a class="dropdown-toggle nav-link dropdown-user-link" href="javascript:;" > <span class="username">Admin</span> <span class="avatar avatar-online"><img src="/images/avatar-s-19.png" alt="avatar"></span> </a> </li>
        </ul>
      </div>
    </div>
  </div>
</nav>
<div class="main-menu menu-fixed menu-light menu-accordion    menu-shadow " data-scroll-to-active="true" />
  <div class="navbar-header">
    <ul class="nav navbar-nav flex-row">
      <li class="nav-item mr-auto"><a class="navbar-brand" href="index.html"><img class="brand-logo" alt="Chameleon admin logo" src="/images/logo.jpg"/>
        <h3 class="brand-text">开饭啦外卖平台</h3>
        </a></li>
      <li class="nav-item d-md-none"><a class="nav-link close-navbar"><i class="ft-x"></i></a></li>
    </ul>
  </div>
  <div class="main-menu-content">
    <ul class="navigation navigation-main" id="main-menu-navigation" data-menu="menu-navigation">
      <li class=" nav-item active"><a th:href="@{/store/index}"><i class="ft-home"></i><span class="menu-title">首页</span></a></li>
      <li class=" nav-item"><a href="javascript:;"><i class="la la-medkit"></i><span class="menu-title"> 菜品中心</span></a>
        <ul class="menu-content">
          <li><a th:href="@{/store/goods}">菜品管理</a> </li>
          <li><a th:href="@{/store/goods/0}">菜品添加</a> </li>
        </ul>
      </li>
      <li class=" nav-item"><a href="javascript:;"><i class="ft-users"></i><span class="menu-title"> 商家信息</span></a>
        <ul class="menu-content">
          <li><a th:href="@{/store}">商家信息管理</a> </li>
        </ul>
      </li>
      <li class=" nav-item"><a href="javascript:;"><i class="ft-layout"></i><span class="menu-title">菜品分类</span></a>
        <ul class="menu-content">
          <li><a th:href="@{/store/classify}">菜品分类管理</a> </li>
          <li><a th:href="@{/store/classify/0}">菜品分类添加</a> </li>
        </ul>
      </li>
      <li class=" nav-item"><a href="javascript:;"><i class="ft-file-text"></i><span class="menu-title">商家订单</span></a>
        <ul class="menu-content">
          <li><a th:href="@{/store/order}">商家接单管理</a> </li>
        </ul>
      </li>
    </ul>
  </div>
  <div class="navigation-background"></div>
</div>
<div class="app-content content">
  <div class="content-wrapper">
    <div class="content-wrapper-before"></div>
    <div class="content-header row">
      <div class="content-header-left col-md-4 col-12 mb-2">
        <h3 class="content-header-title">菜品主页</h3>
      </div>
      <div class="content-header-right col-md-8 col-12">
        <div class="breadcrumbs-top float-md-right">
          <div class="breadcrumb-wrapper mr-1">
            <ol class="breadcrumb">
              <li class="breadcrumb-item"><a th:href="@{/store/index}">主页</a></li>
              <li class="breadcrumb-item"><a href="javascript:;">菜品管理</a></li>
              <li class="breadcrumb-item active">菜品主页</li>
            </ol>
          </div>
        </div>
      </div>
    </div>
    <div class="content-body">
      <section class="file-browser">
        <div class="card" style="">
          <div class="card-header">
            <label class="card-title">菜品管理</label>
          </div>
          <div class="card-body">
                <!-- <div class="topbtn"> <a href="javascript:;" class="btn btn-info">报告管理</a> </div>-->
                  <div class="selbox">
                    <div class="form1">
                      <ul class="row">
                        <li class="col-xs-4">
                          <span>菜品名称：</span>
                          <form name="searchFrom" th:action="@{/store/goods}" method="get">
                            <input type="hidden" name="page" id="page" value="1">
                          <input type="text" name="goodsName" class="form-control" th:value="${goods.goodsName}">
                          </form>
                      </li>

                      <li class="col-xs-4" style="padding-left: 10px">
                          <a href="javascript:;" class="btn btn-primary" onclick="toSearch()">查询</a>
                          <a href="javascript:;" class="btn btn-default" onclick="reset('goodsName')">重置</a>
                          <a th:href="@{/store/goods/0}" class="btn btn-bg-gradient-x-purple-red">添加菜品</a>
                      </li>
                      </ul>
                    </div>
                  <div class="tablebox">
					  <table class="table">
                    <thead>					
                      <tr>			
                        <th><input type="checkbox" class="allsel"></th>
                        <th>菜品分类</th>
                        <th>菜品图片</th>
                        <th>菜品名称</th>
                        <th>菜品库存</th>
                        <th>菜品价格</th>
                        <th>菜品简介</th>
                        <th>菜品状态</th>
                        <th>操作</th>
                  
                      </tr>
														
                    </thead>
                    <tbody>
                    <tr th:each="goods, stat : ${goodsList}">
                      <td th:text="${stat.count}"></td>
                      <td th:text="${@SysDictDataService.selectDictLabel('sys_goods_classify_id',goods.goodsClassifyId)}">菜品分类</td>
                      <td><img th:src="@{${goods.goodsHeadImage}}"height="40px" width="40px"></td>
                      <td th:text="${goods.goodsName}">黄焖鸡</td>
                      <td th:text="${goods.goodsInventory}">111</td>
                      <td th:text="${goods.goodsPrice}">12.30</td>
                      <td th:title="${goods.goodsIntroduce}" th:text="${#strings.abbreviate(goods.goodsIntroduce,150)}">菜品简介</td>
                      <td th:text="${@SysDictDataService.selectDictLabel('sys_goods_status',goods.goodsStatus)}">菜品状态</td>
                      <td>
                            <span>
                                  <a th:if="${goods.getGoodsStatus()==0}"
                                     th:href="@{/store/goods/onDown/{id}(id=${goods.goodsId})}">
                                  <img th:src="@{/images/xiajia.png}" title="下架"/>
                                  </a>
                            </span>
                        <span>
                                  <a th:if="${goods.getGoodsStatus()==1}"
                                     th:href="@{/store/goods/onDown/{id}(id=${goods.goodsId})}">
                                  <img th:src="@{/images/shangjia.png}" title="上架"/>
                                  </a>
                            </span>
                              <span>
                                  <a th:href="@{/store/goods/{id}(id=${goods.goodsId})}">
                                  <img th:src="@{/images/xiugai.png}" title="修改"/>
                                  </a>
                              </span>
                        <span>
                                  <a href="#" th:onclick="'del(' + ${goods.goodsId} + ')'">
                                  <img th:src="@{/images/schu.png}" title="删除"/>
                                  </a>
                              </span>
                      </td>
                    </tr>
                      </tbody>
                    
                  </table>
                    <!--引用公共的分页导航条组件-->
                    <div th:replace="pager::page-navbar"></div>
					  </div>
              </div>
        </div>
        </div>
      </section>
    </div>
  </div>
</div>
<footer class="footer footer-static footer-light navbar-border navbar-shadow">
  <div class="clearfix blue-grey lighten-2 text-sm-center mb-0 px-2"><span class="float-md-left d-block d-md-inline-block">2022  &copy; Copyright 开饭啦外卖平台 © 2022-2023</span>
    <ul class="list-inline float-md-right d-block d-md-inline-blockd-none d-lg-block mb-0">
      <li class="list-inline-item">开饭啦外卖平台</li>
    </ul>
  </div>
</footer>


<!-- BEGIN VENDOR JS-->
<script src="/js/vendors.min.js" type="text/javascript"></script>
<script src="/js/app-menu.js" type="text/javascript"></script>
<script src="/js/app.js" type="text/javascript"></script>
<script src="/js/echarts.min.js" type="text/javascript"></script>
<script src="/laydate/laydate.js" type="text/javascript"></script>
<<script th:src="@{/js/takeout/goods.js}" ></script>
<script th:src="@{/js/common-search.js}" ></script>
<script th:src="@{/js/toastr.js}"></script>


<script>
lay('#version').html('-v'+ laydate.v);
laydate.render({
    elem: '#date'
  ,range: true
  ,theme: '#6967ce'
});
<!--将这个属性值设置为不同的值就能让提示信息显示在不同的位置，-->
<!--如：toast-bottom-right 表示下右-->
<!--toast-bottom-center表示下中-->
<!--toast-top-center表示上中等-->

toastr.options.positionClass = 'toast-top-center';
</script>
</body>
</html>